ostree-remount: Check for / being *mounted* read-only, not necessarily writable
authorColin Walters <walters@verbum.org>
Tue, 3 Jun 2014 21:38:00 +0000 (17:38 -0400)
committerColin Walters <walters@verbum.org>
Tue, 3 Jun 2014 21:38:00 +0000 (17:38 -0400)
commitcb43d2942f99bb9200b212e0b76397ba66ab70ee
tree15a0a671075a190399d27d5bfcb72efe207e5c76
parentf22fa92aef0cf7334d09addacfdfc70c9f10e075
ostree-remount: Check for / being *mounted* read-only, not necessarily writable

The previous S_IMMUTABLE commit broke ostree-remount; / is now not
actually writable.  All we really wanted to know though was whether it
was *mounted* writable, so check that via statvfs() which is cleaner
anyways (i.e. not via access() which kernel people hate).

https://bugzilla.gnome.org/show_bug.cgi?id=728006
src/switchroot/ostree-remount.c